import request from '@/utils/request'

// 查询设备分组列表
export function listEquipmentGroup(data) {
  return request({
    url: '/equipment/listEquipmentGroup',
    method: 'post',
    data: data
  })
}

// 查询设备分组详细
export function getEquipmentGroup(id) {
  return request({
    url: '/equipment/getEquipmentGroupById?id=' + id,
    method: 'get'
  })
}

// 新增设备分组
export function addEquipmentGroup(data) {
  return request({
    url: '/equipment/addEquipmentGroup',
    method: 'post',
    data: data
  })
}

// 修改设备分组
export function updateEquipmentGroup(data) {
  return request({
    url: '/equipment/editEquipmentGroup',
    method: 'post',
    data: data
  })
}

// 删除设备分组
export function delEquipmentGroup(id) {
  return request({
    url: '/equipment/delEquipmentGroup?ids=' + id,
    method: 'delete'
  })
}



// 查询设备列表
export function listEquipment(data) {
  return request({
    url: '/equipmentMessage/listEquipment',
    method: 'post',
    data: data
  })
}

// 查询设备详细
export function getEquipment(id) {
  return request({
    url: '/equipmentMessage/getEquipmentById?id=' + id,
    method: 'get'
  })
}

// 新增设备
export function addEquipment(data) {
  return request({
    url: '/equipmentMessage/addEquipment',
    method: 'post',
    data: data
  })
}

// 修改设备
export function updateEquipment(data) {
  return request({
    url: '/equipmentMessage/editEquipment',
    method: 'post',
    data: data
  })
}

// 删除设备
export function delEquipment(id) {
  return request({
    url: '/equipmentMessage/delEquipment?ids=' + id,
    method: 'delete'
  })
}

// 设备分组详情
export function equipmentGroupInfo(data) {
  return request({
    url: '/equipmentMessage/equipmentGroupInfo',
    method: 'post',
    data: data
  })
}

// 移除分组中的设备
export function removeGroup(data) {
  return request({
    url: '/equipmentMessage/removeGroup?equipmentId=' + data.equipmentId,
    method: 'get'
  })
}

